package com.gisocn.onemap.ui.adapter;

import android.text.TextUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.gisocn.onemap.model.QueryStatisticsResultBean;
import com.gisocn.onemap.sgzx.R;
import java.util.List;

/* loaded from: classes2.dex */
public class QueryStatisticsBaseAdapter extends BaseQuickAdapter<QueryStatisticsResultBean, BaseViewHolder> {
    private int selectIndex;

    public void notifyDataSetChanged(int i) {
        this.selectIndex = i;
        notifyDataSetChanged();
    }

    public QueryStatisticsBaseAdapter(int i, List<QueryStatisticsResultBean> list) {
        super(i, list);
        this.selectIndex = -1;
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // com.chad.library.adapter.base.BaseQuickAdapter
    public void convert(BaseViewHolder baseViewHolder, QueryStatisticsResultBean queryStatisticsResultBean) {
        String str;
        int itemPosition = getItemPosition(queryStatisticsResultBean);
        int i = itemPosition + 1;
        if (TextUtils.isEmpty(queryStatisticsResultBean.getDisplayFieldValue())) {
            str = "";
        } else {
            str = i + "." + queryStatisticsResultBean.getDisplayFieldValue();
        }
        baseViewHolder.setBackgroundResource(R.id.rlItemRoot, itemPosition == this.selectIndex ? R.color.colorGray : R.color.colorWhite).setText(R.id.tv_title, str);
    }
}
